﻿using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using K9Nano.Authorization;

namespace K9Nano.Application.Authentication;

public interface IPermissionAppService
{
    /// <summary>
    /// 获取所有权限
    /// </summary>
    /// <returns></returns>
    IEnumerable<Permission> GetAllPermissions();

    /// <summary>
    /// 获取拥有权限的角色列表
    /// </summary>
    /// <param name="permission">权限</param>
    /// <returns></returns>
    Task<IEnumerable<RoleDto>> GetRolesByPermissionAsync(string permission, CancellationToken cancellation = default);
}
